<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>display: grid</title>
    <style>
        .grid-container {
            display: grid;
            grid-template-columns: repeat(3, 1fr); /* 三列等宽 */
            gap: 10px;
            border: 1px solid #ccc;
            padding: 10px;
        }

        .item {
            background-color: mediumpurple;
            padding: 10px;
            text-align: center;
        }
    </style>
</head>
<body>

<div class="grid-container">
    <div class="item">A</div>
    <div class="item">B</div>
    <div class="item">C</div>
    <div class="item">D</div>
    <div class="item">E</div>
    <div class="item">F</div>
</div>

</body>
</html>